import {Injectable} from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class PatternService {
  public static num = '^[0-9]*$';
  public static letter = '^[A-Za-z]*$';
  public static email = '^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$';
  public static mobile = '^1[0-9]{10}$';
  public static tel = '(^1[0-9]{10}$)|(^((^[0-9]{3,4}-[0-9]{7,8}$)|(^[0-9]{7,8}$))$)';
  public static integer = '^[0-9]*[1-9][0-9]*$';
  public static positive = '^[0-9]+\.?[0-9]{0,9}$';

  public static FOLDERNAME_REGEXP: RegExp = /^[0-9A-Za-z_]+$/;
  public static FILENAME_REGEXP: RegExp = /^[0-9A-Za-z_]+.[a-z]{1,5}$/;
}
